package com.example.demo3.impl;

import com.example.demo3.LightSwitch;
import com.example.demo3.TrafficLight;

public class LightSwitchRedImpl implements LightSwitch {
    @Override
    public void switchToRed(TrafficLight trafficLight) {
        System.out.println("已经是红灯了,无法切换 ");
    }

    @Override
    public void switchToGreen(TrafficLight trafficLight) {
        System.out.println("绿灯不能直接切换 ");
    }

    @Override
    public void switchYellow(TrafficLight trafficLight) {
        System.out.println("黄灯亮起.......");
    }
}
